/**
 * It makes stuff
 * @author Mark
 */
package gfs;

import java.io.Serializable;

public class StrategoEvent extends Object implements Serializable
    {   
    /**
     * Constructs a default <code>StrategoEvent</code>
     * 
     * @param origin 
     *      The location it came from.
     * @param to 
     *      The location it moved to.
     */
    public StrategoEvent(int origin, int to)
        {
        super();
        this.origin = origin;
        this.to = to;
        ready = true;
        }
    
    /**
     * Returns the <code>Coordinate</code> it came from.
     * 
     * @return 
     *      The <code>Coordinate</code> it came from.
     */
    public Coordinate getOrigin()
        {
        return Coordinate.getCoordinateFromHashNumber(origin);
        }
    
    /**
     * Returns the <code>Coordinate</code> it needs to move to.
     * 
     * @return 
     *      The <code>Coordinate</code> it needs to move to.
     */
    public Coordinate getTo() 
        {
        return Coordinate.getCoordinateFromHashNumber(to);
        }

    @Override
    public String toString() 
        {
        return new String("My origin was: " + origin + "\nI moved to: " + to);
        }
    
    //Data Members
    private int origin;
    private int to;
    public boolean ready;
    }